using System;
using Avalonia.Animation.Easings;

namespace AvaloniaUI.Modal.Animations
{
    /// <summary>
    /// 定义模态对话框的动画效果
    /// </summary>
    public class ModalAnimation
    {
        /// <summary>
        /// 获取默认的动画设置（淡入淡出，250毫秒）
        /// </summary>
        public static ModalAnimation Default => new ModalAnimation 
        { 
            Duration = TimeSpan.FromMilliseconds(250),
            Type = AnimationType.Fade,
            Easing = new CubicEaseOut()
        };

        /// <summary>
        /// 获取或设置动画持续时间
        /// </summary>
        public TimeSpan Duration { get; set; } = TimeSpan.FromMilliseconds(250);

        /// <summary>
        /// 获取或设置动画类型
        /// </summary>
        public AnimationType Type { get; set; } = AnimationType.Fade;

        /// <summary>
        /// 获取或设置动画缓动函数
        /// </summary>
        public IEasing Easing { get; set; } = new CubicEaseOut();
    }
}